<template>
	<view class="detailBox">
		<view class="mart-30">
			<view class="commit-title">钢丝绳信息</view>
			<view class="topContent readBox" v-if="thisData">
				<u-read-more ref="uReadMore" :showHeight="200" closeText="查看更多" :toggle="true">
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">钢丝绳编码</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.code}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">钢丝绳名称</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.name}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">规格型号</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.guiGe}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">直径</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.diameter}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">公称捻距</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.nianJu}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">抗拉强度</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.mpa_Name}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">表面状态</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.surfaceStatus_Name}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">捻制类型</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.twistingType_Name}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">长度</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.lengthNum}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">备绳维保周期</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.keepDay}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">供应商</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.supplier_Name}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">制造商</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.producer_Name}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">矿山</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.department_Name}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">提升机类型</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.xxx}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">提升机用途</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.hoisterUsage_Name}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">钢丝绳类型</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.wireropeType_Name}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">是否出库</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.isOut?'否':'是'}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">下次维保日期</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{thisData.nextKeepDate | ymd}}</text>
						</u-col>
					</u-row>
				</u-read-more>
			</view>
		</view>
		<view class="mart-30">
			<view class="commit-title">流转信息</view>
			<view class="topContent readBox" v-for="(item,index) in thisData.billModel">
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">出入库单号</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{item.code}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">出入库类型</text>
						</u-col>
						<u-col span="6">
							<!-- <text class="label-name">{{item.inOutType | enums($enums.Bill_InOutType)}}</text> -->
							<text class="label-name">{{item.operType_Name}}</text>
							
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">状态</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{item.status | enums($enums.Bill_Status)}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">申请人</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{item.applyUserName}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">申请时间</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{item.billDate | ymd}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">验收人</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{item.confirmUserName}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">验收时间</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{item.confirmDate | ymd}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">入库备注</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{item.remark}}</text>
						</u-col>
					</u-row>
			</view>
		</view>
		<view class="mart-30">
			<view class="commit-title">维保记录</view>
			<view class="topContent readBox" v-if="thisData">
				<u-empty v-if="thisData.stockWireropeKeepModelList.length==0" mode="data" text="暂无数据">
				</u-empty>
				<template v-for="(item,index) in thisData.stockWireropeKeepModelList">
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">序号</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{item.stockWireropeKeepID}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">实施单位</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{item.companyName}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">实施人员</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{item.userName}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">实施日期</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{item.doDate}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">实施图片</text>
						</u-col>
						<u-col span="2">
							<u-button type="primary" size="small" text="查看"></u-button>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">备注</text>
						</u-col>
						<u-col span="6">
							<text class="label-name">{{item.remark}}</text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
					<u-row gutter="0" class="marb-20">
						<u-col span="4" textAlign="center">
							<text class="label-name">状态</text>
						</u-col>
						<u-col span="6">
							<text class="label-name"></text>
						</u-col>
					</u-row>
					<u-line class="marb-20"></u-line>
				</template>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				thisID: null,
				thisData: {
					stockWireropeKeepModelList:[]
				}
			}
		},
		onLoad(options) {
			let that = this;
			// #ifdef APP-NVUE
			const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE
			// #endif

			// #ifndef APP-NVUE
			const eventChannel = this.getOpenerEventChannel();
			// #endif
			eventChannel.on('editData', function(data) {
				that.init(data.data);
			})
		},
		beforeDestroy() {

		},
		methods: {
			init(data) {
				this.thisID = data.stockID;
				this.$app.CallApi(this.$app.api.Stock.GetByID(this.thisID), {
					success: res => {
						this.thisData = res;
					}
				})
				return;
				// let data = {
				// 	checkWireropeStatusMonitorModel: {
				// 		autoID: 0,
				// 		checkWireropeStatusMonitorID: 0,
				// 		groupInfoID: 0,
				// 		usingWireropeID: 0,
				// 		la: 0,
				// 		dia: 0,
				// 		lma: 0,
				// 		summary: 0,
				// 	},
				// 	lastCheckWireropeModel: {
				// 		checkWireropeDetailModels: [{
				// 			checkWireropeDetailDataModels: [{
				// 				autoID: 0,
				// 				checkWireropeDetailDataID: 0,
				// 				groupInfoID: 0,
				// 				usingWireropeID: 0,
				// 				checkWireropeID: 0,
				// 				checkWireropeDetailID: 0,
				// 				type: 0,
				// 				position: 0,
				// 				num: 0,
				// 			}, ],
				// 			checkWireropeDetailPositionModels: [{
				// 				autoID: 0,
				// 				checkWireropeDetailPositionID: 0,
				// 				groupInfoID: 0,
				// 				usingWireropeID: 0,
				// 				checkWireropeID: 0,
				// 				checkWireropeDetailID: 0,
				// 				dsStart: 0,
				// 				dsEnd: 0,
				// 			}, ],
				// 			autoID: 0,
				// 			checkWireropeDetailID: 0,
				// 			groupInfoID: 0,
				// 			usingWireropeID: 0,
				// 			checkWireropeID: 0,
				// 			sortNo: 0,
				// 			name: "string",
				// 			dsCnt: 0,
				// 			dsLa: 0,
				// 			zjPosition: 0,
				// 			zjDia: 0,
				// 			jsjmPosition: 0,
				// 			jsjmLma: 0,
				// 			othFuShi: "string",
				// 			othMoSun: "string",
				// 			othQiTa: "string",
				// 			othZongHe: "string",
				// 		}, ],
				// 		autoID: 0,
				// 		checkWireropeID: 0,
				// 		groupInfoID: 0,
				// 		usingWireropeID: 0,
				// 		checkUnit: "string",
				// 		checkUserName: "string",
				// 		checkDate: "2023-10-09T06:30:05.057Z",
				// 		nextCheckDate: "2023-10-09T06:30:05.057Z",
				// 		status: 0,
				// 		createUserID: 0,
				// 		createUserName: "string",
				// 		createDate: "2023-10-09T06:30:05.057Z",
				// 		submitUserID: 0,
				// 		submitUserName: "string",
				// 		submitDate: "2023-10-09T06:30:05.057Z",
				// 	},
				// 	lastUsingWireropeKeepModel: {
				// 		autoID: 0,
				// 		usingWireropeKeepID: 0,
				// 		groupInfoID: 0,
				// 		usingWireropeID: 0,
				// 		wireropeKeepTypeID: 0,
				// 		doPosition: "string",
				// 		companyName: "string",
				// 		userName: "string",
				// 		doDate: "2023-10-09T06:30:05.057Z",
				// 		remark: "string",
				// 		pic_Imgs: "string",
				// 		pic_ImgsList: [{
				// 			fileName: "string",
				// 			url: "string",
				// 		}, ],
				// 		attr_Files: "string",
				// 		attr_FilesList: [{
				// 			fileName: "string",
				// 			url: "string",
				// 		}, ],
				// 		createUserID: 0,
				// 		createUserName: "string",
				// 		createDate: "2023-10-09T06:30:05.057Z",
				// 	},
				// 	checkWireropeHistoryList: [{
				// 			tabName: "LA",
				// 			x_Date: ["2023-10-06T06:30:05.057Z", "2023-10-07T06:30:05.057Z",
				// 				"2023-10-08T06:30:05.057Z"
				// 			],
				// 			items: [{
				// 					name: "绳1",
				// 					num: [1, 2, 3],
				// 				},
				// 				{
				// 					name: "绳2",
				// 					num: [2, 4, 6],
				// 				},
				// 				{
				// 					name: "绳3",
				// 					num: [3, 6, 9],
				// 				},
				// 			],
				// 		},
				// 		{
				// 			tabName: "DIA",
				// 			x_Date: ["2023-10-06T06:30:05.057Z", "2023-10-07T06:30:05.057Z",
				// 				"2023-10-08T06:30:05.057Z"
				// 			],
				// 			items: [{
				// 					name: "绳1",
				// 					num: [10, 20, 30],
				// 				},
				// 				{
				// 					name: "绳2",
				// 					num: [20, 40, 60],
				// 				},
				// 				{
				// 					name: "绳3",
				// 					num: [30, 60, 90],
				// 				},
				// 			],
				// 		},
				// 	],
				// 	mpa_Name: "抗拉强度名字",
				// 	surfaceStatus_Name: "表面状态名字",
				// 	twistingType_Name: "捻制类型名字",
				// 	supplier_Name: "供应商名字",
				// 	producer_Name: "制造商名字",
				// 	department_Name: "矿山名字",
				// 	hoisterUsage_Name: "主井",
				// 	wireropeType_Name: "主井首绳",
				// 	hoister_Name: "提升机001",
				// 	hoister_ImgsList: [{
				// 		fileName: "string",
				// 		url: "string",
				// 	}, ],
				// 	installAddress_Name: "string",
				// 	autoID: 123,
				// 	usingWireropeID: 0,
				// 	groupInfoID: 0,
				// 	stockID: 0,
				// 	code: "GS001",
				// 	guiGe: "6*36",
				// 	diameter: 3,
				// 	cnt: 4,
				// 	name: "钢丝绳001",
				// 	nianJu: 0,
				// 	mpaID: 0,
				// 	surfaceStatusID: 0,
				// 	twistingTypeID: 0,
				// 	lengthNum: 0,
				// 	supplierID: 0,
				// 	producerID: 0,
				// 	departmentID: 0,
				// 	hoisterUsageID: 0,
				// 	wireropeTypeID: 0,
				// 	hoisterID: 0,
				// 	installDate: "2023-10-01T01:09:07.934Z",
				// 	installLengthNum: 10,
				// 	installAddressID: 0,
				// 	linkUser: "张三",
				// 	linkPhone: "1311111111",
				// 	remark: "备注123",
				// 	laNiu_Files: "string",
				// 	laNiu_FilesList: [{
				// 		fileName: "string",
				// 		url: "string",
				// 	}, ],
				// 	qianWuSun_Files: "string",
				// 	qianWuSun_FilesList: [{
				// 		fileName: "string",
				// 		url: "string",
				// 	}, ],
				// 	houWuSun_Files: "string",
				// 	houWuSun_FilesList: [{
				// 		fileName: "string",
				// 		url: "string",
				// 	}, ],
				// 	outStockDate: "2023-10-09T06:30:05.057Z",
				// 	nextCheckDate: "2023-10-09T06:30:05.057Z",
				// 	status: 0,
				// 	changeReason: "string",
				// 	changeDate: "2023-10-09T06:30:05.057Z",
				// 	createUserID: 0,
				// 	createUserName: "string",
				// 	createDate: "2023-10-09T06:30:05.057Z",
				// 	updateUserID: 0,
				// 	updateUserName: "string",
				// 	updateDate: "2023-10-09T06:30:05.057Z",
				// };
				// this.thisData = data;
				return;
			},
		}
	}
</script>

<style>

</style>